package com.zx.idc.backend.gui.api.management.basicdata.common;

import com.zx.idc.xml.entity.basedata.BasicInfo;
import com.zx.idc.xml.entity.basedata.UpdateInfo;
import com.zx.idc.xml.entity.basedata.newinfo.NewInfo;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * 获取一些默认的 IDC 监测数据实体
 *
 * @author rxliuli
 */
@Component
public class BasicDataDefaultInstance {
    /**
     * 获取 XML Bean 11.4 表 33
     */
    public BasicInfo getBasicInfo() {
        final BasicInfo basicInfo = new BasicInfo();
        basicInfo.setTimeStamp(LocalDateTime.now());
        return basicInfo;
    }

    public NewInfo getNewInfo(String idcId) {
        final NewInfo info = new NewInfo();
        info.setIdcId(idcId);
        return info;
    }

    public UpdateInfo getUpdateInfo(String idcId) {
        final UpdateInfo updateInfo = new UpdateInfo();
        updateInfo.setIdcId(idcId);
        return updateInfo;
    }
}
